home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / programr / rsxwdk2s.zip / RSXWDK / LIBSRC / DOS / DOS4400.C < prev    next >
C/C++ Source or Header  |  1994-12-17  |  356b  |  25 lines

  1. #include <errno.h>
  2. #include <sys/doscalls.h>
  3.  
  4.  
  5. /*
  6. ** AH = 0x44 ; AL = 0
  7. ** BX = handle
  8. */
  9. int dos_ioctl_getattr(int handle)
  10. {
  11.     struct REGPACK r;
  12.  
  13.     r.eax = 0x4400;
  14.     r.ebx = handle;
  15.  
  16.     _intr(0x21, &r);
  17.  
  18.     if (r.eflags & 1) {
  19.     _sys_doserror2errno( r.eax & 0xFFFF);
  20.     return (-1);
  21.     }
  22.     else
  23.     return (r.edx & 0xFFFF);
  24. }
  25.